Expose list peers and channels#56
Conversation
| pub fn list_peers(&self) -> Vec<PeerDetails> { | ||
| let active_connected_peers: Vec<PublicKey> = | ||
| self.peer_manager.get_peer_node_ids().iter().map(|p| p.0).collect(); | ||
| self.peer_store |
There was a problem hiding this comment.
Mh, I wonder if it would be nice to have a is_persisted: bool field on PeerDetails so that this also lists connected-but-not-stored peers. I think it should be possible to get all necessary information from get_peer_node_ids. Feel free to add this here, otherwise I'll add a tracking issue, since it might be easier after our eventual transition to NetAddress.
There was a problem hiding this comment.
yeah... I just took a stab at it and it looks like it may be easier if we both had PeerInfo and the tuple returns by get_peer_node_ids return a consistent type for address.
There was a problem hiding this comment.
Alright, we'll see what lands first, feel free to leave as is currently.
src/types.rs
Outdated
| /// Information about the channel's funding transaction output. `None `unless a funding | ||
| /// transaction has been successfully negotiated with the channel's counterparty. | ||
| pub funding_txo: Option<OutPoint>, | ||
| /// Position of the funding transaction on-chain. `None` unless the funding transaction has been |
There was a problem hiding this comment.
Mh, yeah, good question after all. Actually I'd like to avoid exposing the complexity of SCID aliases to the user, but I'm not sure we can now that LSP spec might depend on them. Although, maybe we should leave them out for now after all and really just add them when integrating the LSP client.
5506f23 to
49f7f59
Compare
|
resolved conflicts and squashed into 5506f23 |
Not exactly sure what happened, but seems your changes are gone, i.e., you just pushed the branch you meant to rebase on? |
|
Oops, I think I forgot to push something/had a cached version of the page. Squashed into 025b6d2 |
d58cf3c to
53db279
Compare
|
looks like there may be some conflicts in #25 |
53db279 to
25c947d
Compare
|
hm, looks like there are still conflicts? |
The princess is in another castle. |
25c947d to
50e7368
Compare
|
ok looking good -- rebased to 50e7368 |
50e7368 to
c726ef9
Compare
|
Fixed lint errors and squashed into c726ef9 |
c726ef9 to
5a1fbe6
Compare
|
rebased to 5a1fbe6 |
src/types.rs
Outdated
| /// Information about the channel's funding transaction output. `None `unless a funding | ||
| /// transaction has been successfully negotiated with the channel's counterparty. | ||
| pub funding_txo: Option<OutPoint>, | ||
| /// Position of the funding transaction on-chain. `None` unless the funding transaction has been |
# Conflicts: # bindings/ldk_node.udl # Conflicts: # src/types.rs
5a1fbe6 to
ce70bfe
Compare
tnull
left a comment
There was a problem hiding this comment.
LGTM, we can address any outstanding issues in a follow-up.
…nnel-api-fix Consistently use UserChannelId and PaymentId as Strings.
Based on #25.
Transferred from tnull#3